package org.sky;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.ComponentScan;

import java.util.Date;

/**
 * springboot服务提供者启动类
 */
@SpringBootApplication
@EnableEurekaClient //本服务启动后会自动注册进eureka服务中
@EnableCircuitBreaker//对hystrixR熔断机制的支持
@ComponentScans(value =
        {@ComponentScan(value = "org.sky.config"),
         @ComponentScan(value = "org.sky.sys")})
public class SysOrganProviderApplication {
    /**
     * logback日志框架
     */
    private static Logger logger = LoggerFactory.getLogger(SysOrganProviderApplication.class);
    public static void  main(String[] args){
        logger.info("......microserviceCloud-provider-dept start{}",new Date());
        SpringApplication.run(SysOrganProviderApplication.class,args);
    }
}
